<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>

<div class="home-escort-list" id="login-page">
	<span style="line-height:30px;" class="inputclass">
		<?php echo language_translate('escort_login_page_forgot_details_page');?>
	</span>
	<div class="dashboard-info-wrapper inputclass">
		<div class="dashboard-info-left">
			&nbsp;	
		</div>
		<div class="dashboard-info-right">
			<div class="select-box">
				<input type="text" name="email" id="email" value="" maxlength="45" class="text-box2">
				<div class="clear"></div>
				<div class="input-error" id="email_err"></div>
			</div>
		</div>
		<div class="clear"></div>
	</div>	
	
	<div class="dashboard-info-wrapper inputclass">
		<div class="dashboard-info-left"><span>&nbsp;</span></div>
		<div class="dashboard-info-right">
			<div class="select-box">
				<input type="button" class="save-button" value="<?php echo language_translate('escort_login_page_send');?>" /> 
				<?php echo loader_image("id='loader_image' class='hidden'");?>
			</div>
		 </div>
		<div class="clear"></div>
	</div>
	
	<div class="dashboard-info-wrapper">
		<div id="msg"></div>
	</div>
		 
</div>

<script type="text/javascript">
	$(document).ready(function() {
		$('.save-button').bind('click',function(){
			$('#loader_image').toggle();
			$('#msg').html('');
			$.post(BASE_URI+'authorization/submit_forgot_details',{email:$('#email').val()},function(res){
				if(res.result == 'err'){
					$('#msg').html('<span style="color:red;">'+res.msg+'</span>');
					$('#loader_image').toggle();
				}
				if(res.result == 'ok'){
					$('#msg').html('<span style="color:green;">'+res.msg+'</span>');
					$('.inputclass').hide();
				}
			},'json');
		});
	});	

</script>	